//
//  NSString+utils.h
//  helper
//
//  Created by huangyi on 12-10-29.
//  Copyright (c) 2012年 huangyi. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (utils)

-(NSData*)dataValue;
-(NSUInteger)numberOfLines;
-(NSString*)stringValue;

-(BOOL)isValidJSON;
-(id)jsonObject;
-(id)mutableJsonObject;

-(NSDictionary*)toDictionary;

-(NSString*)toPinYin;
-(NSString*)toPinYinWithSeparator:(NSString*)sep options:(int)options;

+(NSString*)concatStrings:(NSString*)str,...NS_REQUIRES_NIL_TERMINATION;

-(NSDate*)dateWithFormat:(NSString*)format;

-(NSData*)dataFromHex;

@end

extern NSString* NSStringFromCString(char *str);
extern NSString* uniqueID();
extern NSString* MustacheTemplate(NSString *mustache,id object);
